package com.hilon.foundation.query_only;
import com.hilon.foundation.para.FoundationQueryPara;
import com.hilon.foundation.util.ResultBean;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

public class QueryOnlyBaseController<T> {
    protected QueryOnlyBaseService<T> service;

    protected void setService(QueryOnlyBaseService<T> service) {
        this.service = service;
    }

    @PostMapping("/queryByCondition")
    public ResultBean<List<T>> queryByCondition(@RequestBody FoundationQueryPara conditionPara) {
        return service.queryByCondition(conditionPara);
    }
}
